TestBehaviorTree5 = BTBehaviorTree:New()

local this = TestBehaviorTree5
this.name = "测试行为树2"

function this:New()
    local o = {}
    setmetatable(o, self)
    self.__index = self
    o:Init()
    return o
end

function this:Init()
    local sequence1=BTSequence:New()
    local sequence2=BTSequence:New()
    local selector=BTSelector:New()
    local isAlive=BTIsAlive:New(1)
    local log1=BTLog:New("LogTest 1")
    local log2 = BTLog:New("LogTest 2")
    local inverter=BTInverter:New()
    local log3 = BTLog:New("LogTest 3")

    self:SetStartTask(sequence1)

    sequence1:AddChild(sequence2)
    sequence1:AddChild(selector)
    sequence2:AddChild(isAlive)
    sequence2:AddChild(log1)
    selector:AddChild(inverter)
    selector:AddChild(log3)
    inverter:AddChild(log2)
end
